<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Mess_model extends MY_Model
{
    function Mess_model()
    {
        parent::MY_Model();
    }
    function ww_add_mess($owner, $target, $topic, $content)
    {
        $this->exeQuery("CALL ww_add_mess('$owner' ,'$target', '$topic', '$content');");
    }
    function ww_user_info($username)
    {
        return $this->getRows("CALL ww_user_info('$username')", 0);
    }
    function ww_get_all_mail_by_user($uid, $typeview)
    {
        return $this->getRows("CALL ww_get_all_mail_by_user('$uid', '$typeview')", 1);
    }
    function ww_mess_get_all_info($messid, $uid)
    {
        return $this->getRows("CALL ww_mess_get_all_info('$messid', '$uid')", 0);
    }
    function ww_update_read_mess_by_user($uid, $messid)
    {
        $this->exeQuery("CALL ww_update_read_mess_by_user('$uid', '$messid');");
    }
    
}